/*
 *  Copyright (C) 2011 JiangHongTiao <jjurco.sk_gmail.com>
 * 
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package sk.lieskove.jianghongtiao.sitesearch.plugin;

import com.hp.hpl.jena.rdf.model.Resource;

/**
 * Date of create: Sep 6, 2011
 *
 * @author JiangHongTiao <jjurco.sk_gmail.com>
 * @version 2011.0906
 */
public interface SiteResourcesPlugin {
    
    /**
     * Searches on web site throw internal web site search or throw web site API. 
     * Method searches for given query string and number of results is limited 
     * by parameter maxResults. Method returns instance of Resource, where XML
     * results are transformed to RDF/FOAF form. In the case of the document, 
     * where the linguistic preprocessing is required, document is stored locally 
     * and in the RDF/FOAF contains only URI to that document. 
     * 
     * @param maxResults maximal number of retrieved items of the search
     * @return found items transformed to RDF/FOAF format. 
     */
    Resource search(int maxResults);
    
    /**
     * Searches on web site throw internal web site search or throw web site API.
     * Method searches for given query string and number of results is limited 
     * by {@link SiteResourcesPlugin#getMaxLimitSize() }
     * 
     * @return found items transformed to RDF/FOAF format. 
     */
    Resource search();
    
    /**
     * This method returns maximal limit of results to download from the search.
     * Limit is at first checked in the configuration file. When no configuration
     * file is found, or there is no such settings for given plug-in, default 
     * limit is first 1000 items.
     * 
     * @return maximal limit for download items form the site search
     */
    int getMaxLimitSize();
}
